/* 
https://www.npmjs.com/package/@vueuse/core
useStorage 将数据保存到 localStorage 中
*/
import { useStorage } from "@vueuse/core";
const token = useStorage("accessToken", "");
token.value = 'Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImp0aSI6IjVjZTIwYjBmZDdiZDRiODFhMWNhZTgxZmEyNzI3NWY1IiwidXNlcklkIjoyLCJ1c2VybmFtZSI6ImFkbWluIiwiZGVwdElkIjoxLCJkYXRhU2NvcGUiOjEsImF1dGhvcml0aWVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNjg2NTcyODk2fQ.Sebsxco8X9fJaF3YC_2qfFJ-Kj4WfWogIn6S5Zg0oI4'


Mock.mock(RegExp('/dev-api/api/v1/users/me' + ".*"), {
  "code": "00000",
  "data": {
      "userId": 2,
      "nickname": "系统管理员",
      "avatar": "https://oss.youlai.tech/youlai-boot/2023/05/16/811270ef31f548af9cffc026dfc3777b.gif",
      "roles": [
          "ADMIN"
      ],
      "perms": [
          "sys:menu:delete",
          "sys:dict_type:add",
          "sys:dept:edit",
          "sys:dict:edit",
          "sys:dict:delete",
          "sys:dict_type:edit",
          "sys:menu:add",
          "sys:user:add",
          "sys:dept:delete",
          "sys:role:edit",
          "sys:user:edit",
          "sys:user:reset_pwd",
          "sys:user:delete",
          "sys:dept:add",
          "sys:dict_type:delete",
          "sys:role:delete",
          "sys:menu:edit",
          "sys:dict:add",
          "sys:role:add"
      ]
  },
  "msg": "一切ok"
});
Mock.mock(RegExp('/dev-api/api/v1/menus/routes' + ".*"), {
  "code": "00000",
  "data": [
      {
          "path": "/system",
          "component": "Layout",
          "redirect": "/system/user",
          "meta": {
              "title": "系统管理",
              "icon": "system",
              "hidden": false,
              "roles": [
                  "ADMIN"
              ],
              "keepAlive": true
          },
          "children": [
              {
                  "path": "user",
                  "component": "system/user/index",
                  "name": "User",
                  "meta": {
                      "title": "用户管理",
                      "icon": "user",
                      "hidden": false,
                      "roles": [
                          "ADMIN"
                      ],
                      "keepAlive": true
                  }
              },
              {
                  "path": "role",
                  "component": "system/role/index",
                  "name": "Role",
                  "meta": {
                      "title": "角色管理",
                      "icon": "role",
                      "hidden": false,
                      "roles": [
                          "ADMIN"
                      ],
                      "keepAlive": true
                  }
              },
              {
                  "path": "menu",
                  "component": "system/menu/index",
                  "name": "Menu",
                  "meta": {
                      "title": "菜单管理",
                      "icon": "menu",
                      "hidden": false,
                      "roles": [
                          "ADMIN"
                      ],
                      "keepAlive": true
                  }
              },
              {
                  "path": "dept",
                  "component": "system/dept/index",
                  "name": "Dept",
                  "meta": {
                      "title": "部门管理",
                      "icon": "tree",
                      "hidden": false,
                      "roles": [
                          "ADMIN"
                      ],
                      "keepAlive": true
                  }
              },
              {
                  "path": "dict",
                  "component": "system/dict/index",
                  "name": "Dict",
                  "meta": {
                      "title": "字典管理",
                      "icon": "dict",
                      "hidden": false,
                      "roles": [
                          "ADMIN"
                      ],
                      "keepAlive": true
                  }
              }
          ]
      },
      {
          "path": "/api",
          "component": "Layout",
          "meta": {
              "title": "接口",
              "icon": "api",
              "hidden": false,
              "roles": [
                  "ADMIN"
              ],
              "keepAlive": true
          },
          "children": [
              {
                  "path": "apidoc",
                  "component": "demo/api-doc",
                  "name": "Apidoc",
                  "meta": {
                      "title": "接口文档",
                      "icon": "api",
                      "hidden": false,
                      "roles": [
                          "ADMIN"
                      ],
                      "keepAlive": true
                  }
              }
          ]
      },
      {
          "path": "/external-link",
          "component": "Layout",
          "redirect": "noredirect",
          "meta": {
              "title": "外部链接",
              "icon": "link",
              "hidden": false,
              "roles": [
                  "ADMIN"
              ],
              "keepAlive": true
          },
          "children": [
              {
                  "path": "https://juejin.cn/post/7228990409909108793",
                  "meta": {
                      "title": "document",
                      "icon": "document",
                      "hidden": false,
                      "roles": [
                          "ADMIN"
                      ],
                      "keepAlive": true
                  }
              }
          ]
      },
      {
          "path": "/multi-level",
          "component": "Layout",
          "redirect": "/multi-level/multi-level1",
          "meta": {
              "title": "多级菜单",
              "icon": "multi_level",
              "hidden": false,
              "roles": [
                  "ADMIN"
              ],
              "keepAlive": true
          },
          "children": [
              {
                  "path": "multi-level1",
                  "component": "demo/multi-level/level1",
                  "redirect": "/multi-level/multi-level2",
                  "meta": {
                      "title": "菜单一级",
                      "icon": "",
                      "hidden": false,
                      "roles": [
                          "ADMIN"
                      ],
                      "keepAlive": true
                  },
                  "children": [
                      {
                          "path": "multi-level2",
                          "component": "demo/multi-level/children/level2",
                          "redirect": "/multi-level/multi-level2/multi-level3-1",
                          "meta": {
                              "title": "菜单二级",
                              "icon": "",
                              "hidden": false,
                              "roles": [
                                  "ADMIN"
                              ],
                              "keepAlive": true
                          },
                          "children": [
                              {
                                  "path": "multi-level3-1",
                                  "component": "demo/multi-level/children/children/level3-1",
                                  "name": "MultiLevel31",
                                  "meta": {
                                      "title": "菜单三级-1",
                                      "icon": "",
                                      "hidden": false,
                                      "roles": [
                                          "ADMIN"
                                      ],
                                      "keepAlive": true
                                  }
                              },
                              {
                                  "path": "multi-level3-2",
                                  "component": "demo/multi-level/children/children/level3-2",
                                  "name": "MultiLevel32",
                                  "meta": {
                                      "title": "菜单三级-2",
                                      "icon": "",
                                      "hidden": false,
                                      "roles": [
                                          "ADMIN"
                                      ],
                                      "keepAlive": true
                                  }
                              }
                          ]
                      }
                  ]
              }
          ]
      },
      {
          "path": "/component",
          "component": "Layout",
          "meta": {
              "title": "组件封装",
              "icon": "menu",
              "hidden": false,
              "roles": [
                  "ADMIN"
              ],
              "keepAlive": true
          },
          "children": [
              {
                  "path": "wang-editor",
                  "component": "demo/wang-editor",
                  "name": "WangEditor",
                  "meta": {
                      "title": "富文本编辑器",
                      "icon": "",
                      "hidden": false,
                      "roles": [
                          "ADMIN"
                      ],
                      "keepAlive": true
                  }
              },
              {
                  "path": "upload",
                  "component": "demo/upload",
                  "name": "Upload",
                  "meta": {
                      "title": "图片上传",
                      "icon": "",
                      "hidden": false,
                      "roles": [
                          "ADMIN"
                      ],
                      "keepAlive": true
                  }
              },
              {
                  "path": "icon-selector",
                  "component": "demo/icon-selector",
                  "name": "IconSelector",
                  "meta": {
                      "title": "图标选择器",
                      "icon": "",
                      "hidden": false,
                      "roles": [
                          "ADMIN"
                      ],
                      "keepAlive": true
                  }
              },
              {
                  "path": "taginput",
                  "component": "demo/taginput",
                  "name": "Taginput",
                  "meta": {
                      "title": "标签输入框",
                      "icon": "",
                      "hidden": false,
                      "roles": [
                          "ADMIN"
                      ],
                      "keepAlive": true
                  }
              },
              {
                  "path": "signature",
                  "component": "demo/signature",
                  "name": "Signature",
                  "meta": {
                      "title": "签名",
                      "icon": "",
                      "hidden": false,
                      "roles": [
                          "ADMIN"
                      ],
                      "keepAlive": true
                  }
              }
          ]
      },
      {
          "path": "/function",
          "component": "Layout",
          "meta": {
              "title": "功能演示",
              "icon": "menu",
              "hidden": false,
              "roles": [
                  "ADMIN"
              ],
              "keepAlive": true
          },
          "children": [
              {
                  "path": "websocket",
                  "component": "demo/websocket",
                  "name": "Websocket",
                  "meta": {
                      "title": "Websocket",
                      "icon": "",
                      "hidden": false,
                      "roles": [
                          "ADMIN"
                      ],
                      "keepAlive": true
                  }
              },
              {
                  "path": "other",
                  "component": "demo/other",
                  "meta": {
                      "title": "敬请期待...",
                      "icon": "",
                      "hidden": false,
                      "roles": [
                          "ADMIN"
                      ],
                      "keepAlive": true
                  }
              }
          ]
      }
  ],
  "msg": "一切ok"
});
// Mock.mock(RegExp('' + ".*"), "get", mockData);
